<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <title>复杂表单</title>
  <link rel="stylesheet" href="../../layuiAdmin/layui/css/layui.css" />
  <link rel="stylesheet" href="../../layuiAdmin/style/admin.css" />
  <link rel="stylesheet" href="../../layuiAdmin/style/admin1.css" />
  <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  <style>
    #formAdvForm .layui-form-item {
      margin-top: 20px;
      margin-bottom: 0;
    }

    #formAdvForm .layui-form-item .layui-inline {
      margin-bottom: 25px;
      margin-right: 0;
    }

    .form-group-bottom {
      position: fixed;
      left: 0;
      right: 0;
      bottom: 0;
      padding: 10px 20px;
      background-color: #fff;
      box-shadow: 0 -1px 2px 0 rgba(0, 0, 0, .05);
    }

    .layui-form-label {
      white-space: nowrap;
    }
  </style>
</head>

<body>

  <!-- 正文开始 -->
  <form class="layui-form" id="formAdvForm" lay-filter="formAdvForm">
    <div class="layui-fluid" style="padding-bottom: 75px;">

      <div class="layui-card">
        <div class="layui-card-header">详细信息</div>
        <div class="layui-card-body">

          <div class="layui-form-item layui-row">
            <div class="layui-inline layui-col-md12 layui-col-sm12">
              <label for="" class="layui-form-label">隐患详细描述：</label>
              <div class="layui-input-block">
                <input placeholder="请输入内容" class="layui-input">
              </div>
            </div>
            <div class="layui-inline layui-col-md12 layui-col-sm12">
              <label for="" class="layui-form-label">隐患地点：</label>
              <div class="layui-input-block">
                <input placeholder="请输入内容" class="layui-input">
              </div>
            </div>
            <div class="layui-inline layui-col-md6 layui-col-sm6">
              <label for="" class="layui-form-label">整改人：</label>
              <div class="layui-input-block">
                <input placeholder="请输入内容" class="layui-input">
              </div>
            </div>
            <div class="layui-inline layui-col-md6 layui-col-sm6">
              <label for="" class="layui-form-label">整改时间：</label>
              <div class="layui-input-block">
                <input placeholder="请输入内容" class="layui-input">
              </div>
            </div>
            <div class="layui-inline layui-col-md12 layui-col-sm12">
              <label for="" class="layui-form-label">整改情况：</label>
              <div class="layui-input-block">
                <input placeholder="请输入内容" class="layui-input">
              </div>
            </div>
            <div class="layui-inline layui-col-md6 layui-col-sm6">
              <label for="" class="layui-form-label">复查人：</label>
              <div class="layui-input-block">
                <input placeholder="请输入内容" class="layui-input">
              </div>
            </div>
            <div class="layui-inline layui-col-md6 layui-col-sm6">
              <label for="" class="layui-form-label">复查时间：</label>
              <div class="layui-input-block">
                <input placeholder="请输入内容" class="layui-input">
              </div>
            </div>
            <div class="layui-inline layui-col-md12 layui-col-sm12">
              <label for="" class="layui-form-label">复查结果：</label>
              <div class="layui-input-block">
                <input type="radio" name="gk" value="0" title="不通过">
                <input type="radio" name="gk" value="1" title="通过并销号" checked>
              </div>
            </div>
            <div class="layui-inline layui-col-md12 layui-col-sm12">
              <label for="" class="layui-form-label">复查情况：</label>
              <div class="layui-input-block">
                <textarea placeholder="请输入内容" class="layui-textarea"></textarea>
              </div>
            </div>
          </div>

        </div>
      </div>
    </div>

  </form>

  <!-- js部分 -->
  <script type="text/javascript" src="../../layuiAdmin/layui/layui.all.js"></script>
  <script>
    layui.use(['layer', 'form', 'table', 'laydate'], function () {
      var $ = layui.jquery;
      var layer = layui.layer;
      var form = layui.form;
      var table = layui.table;
      var laydate = layui.laydate;
      laydate.render({
        elem: '#date1'

      });


      /* 渲染laydate */
      laydate.render({
        elem: '#formAdvDateSel1',
        range: false,
        trigger: 'click'
      });
      form.on('submit(formAdvClose)', function () {
        layer.close();
        console.log(1)
        return false
      })
      /* 监听表单提交 */
      form.on('submit(formAdvSubmit)', function (data) {
        // 验证表格选择
        var checkRows = table.checkStatus('formAdvTable');
        if (checkRows.data.length === 0) {
          layer.tips('请至少选择一位成员', '#formAdvTable+.layui-table-view .layui-table-header th:eq(0) div', { tips: [1, '#ff4c4c'] });
          return false;
        }
        // 表格选择的数据放到data.field中
        data.field.checkUsers = checkRows.data;
        layer.msg(JSON.stringify(data.field));
        return false;
      });

    });
  </script>
</body>

</html>